import React, {Component} from 'react';
import {Text, View, Button} from 'native-base';

import {createNativeStackNavigator} from '@react-navigation/native-stack';
const Stack = createNativeStackNavigator();

//这是古印印谱下面的一个按钮，点了之后要去innerPrinting
class ASealSelect extends Component {
  constructor(props) {
    super(props);
    this.state = {
      hasPerson: props.person ? true : false,
    };
  }
  render() {
    let MyText;
    if (this.state.hasPerson) {
      MyText = (
        <Text
          style={{
            color: '#7B7B7B',
            marginTop: 3,
            fontSize: 13,
            textAlign: 'center',
          }}>
          {this.props.person}
        </Text>
      );
    }
    return (
      <Button
        h="60"
        _text={{color: '#767676'}}
        bg="#F7F7F7"
        colorScheme="#F7F7F7" //点击按钮的时候的背景颜色
        marginBottom="3"
        paddingTop="5"
        paddingBottom="5"
        onPress={() => {
          this.props.navigation.navigate('InnerPrinting', {...this.props});
        }}>
        <Text style={{color: '#7B7B7B', fontSize: 17, textAlign: 'center'}}>
          {this.props.library}
        </Text>
        {MyText}
      </Button>
    );
  }
}

//抛出模块
export default ASealSelect;
